#ifndef MYPUSHBUTTON_H
#define MYPUSHBUTTON_H
#include <QPushButton>
#include <QWidget>
class MyPushButton : public QPushButton
{
    Q_OBJECT
public:

    enum MyPushButtonStat
    {
        Normal,
        pressed
    };


    MyPushButton(QString normalImg, QString pressefImg, QWidget *parent = nullptr);
    //往上往下动画
    void moveDown();
    void moveUp();

protected:
    void paintEvent(QPaintEvent *ev);
    void mousePressEvent(QMouseEvent *ev);
    void mouseREleaseEvent(QMouseEvent *e);


signals:

private:
    QString mNormalImg;
    QString mPressedImg;
    //按钮状态
    MyPushButtonStat mStat;
};

#endif // MYPUSHBUTTON_H
